import request from '@/utils/request'

// 获取房屋信息
export const getHouse = function (id) {
  return request.get('/houses', { params: { id } })
}
// 获取房屋具体信息
export const getHouseMes = function (id) {
  return request.get('/houses/' + id)
}

// 小区关键字查询
export const houseCommunity = function (params) {
  return request.get('/area/community', { params })
}

// 根据城市名称查询该城市信息
export const getCityMes = function (name) {
  return request.get('/area/info', { params: { name } })
}

// 获取房屋所需条件
export const getHousePar = function () {
  return request.get('/houses/params')
}

// 发布房源
export const HouseSubmit = function (body) {
  return request.post('/user/houses', body)
}
// 查看已发布房源列表
export const HouseList = function () {
  return request.post('/user/houses')
}

// 房屋图像上传
export const houseImg = function (data) {
  return request.post('/houses/image', data)
}
